import config from "@/config"
import http from "@/utils/request"

export default {
    employeePlan:{
        add:{
            url: `${config.API_URL}/main/trip/employeePlan/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/trip/employeePlan/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/trip/employeePlan/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        update: {
            url: `${config.API_URL}/main/trip/employeePlan/update`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        cust: {
            url: `${config.API_URL}/main/crm/cust/queryCustContactList`,
            name: "获取联系人详情",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        report:{
            url: `${config.API_URL}/core/reportCoreService/query`,
            name: "获取客户详细信息",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detailTravelPlanDtl:{
            url: `${config.API_URL}/main/trip/employeePlan/detailTravelPlanDtl`,
            name: "获取客户详细信息",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        doStartingEnrol:{
            url: `${config.API_URL}/main/trip/employeePlan/doStartingEnrol`,
            name: "获取客户详细信息",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }
    },
    applyCost:{
        add:{
            url: `${config.API_URL}/main/trip/applyCost/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/trip/applyCost/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/trip/applyCost/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        update: {
            url: `${config.API_URL}/main/trip/applyCost/update`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
    },
    enrol:{
        add:{
            url: `${config.API_URL}/main/trip/enrol/addComeback`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/trip/enrol/saveComeback`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
    },
    visit:{
        add:{
            url: `${config.API_URL}/main/trip/visit/add`,
            name: "初始化",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/trip/visit/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/trip/visit/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,{ headers: { 'Content-Type': 'multipart/form-data' } });
            }
        },
        update: {
            url: `${config.API_URL}/main/trip/visit/update`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,{ headers: { 'Content-Type': 'multipart/form-data' } });
            }
        },
    },
}